package com.sounou.lombok.simple;

import lombok.val;

import java.util.ArrayList;

/**
 * <p> 类型推导 </p>
 *
 * @author zengneng@hsyuntai.com
 * @date 2019/3/19 9:01
 * @copyright 版权归 HSYUNTAI 所有
 */
public class ValDemo {
    public String example() {
        val example = new ArrayList<String>();
        example.add("Hello, World!");
        val foo = example.get(0);
        return foo.toLowerCase();
    }
    /*
    public String example() {
        ArrayList<String> example = new ArrayList();
        example.add("Hello, World!");
        String foo = (String)example.get(0);
        return foo.toLowerCase();
    }*/
}
